package com.rabbiter.oes.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.rabbiter.oes.entity.MultiQuestionHistory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 选择题答题记录
 */
@Mapper
public interface MultiQuestionHistoryMapper extends BaseMapper<MultiQuestionHistory> {

    /**
     * 通过成绩id获取选择考题记录信息
     * @param scoreId
     * @return
     */
    default List<MultiQuestionHistory> selectByScoreId(Integer scoreId) {
        return selectList(Wrappers.lambdaQuery(MultiQuestionHistory.class).eq(MultiQuestionHistory::getScoreId, scoreId));
    }

}
